package com.nine.shop.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nine.shop.common.ServerResponse;
import com.nine.shop.mapper.AddressMapper;
import com.nine.shop.mapper.OrderMapper;
import com.nine.shop.model.Address;
import com.nine.shop.model.Order;
import com.nine.shop.model.User;
import com.nine.shop.utils.JsonUtil;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


/**
 * @author Shawsw
 * Create on 2019/8/17
 */
@Service
public class AddressService extends ServiceImpl<AddressMapper, Address> {

    @Resource
    private UserService userService;


    public Address selectByUserId(int userId){
        return baseMapper.selectOne(new QueryWrapper<Address>().eq("userId",userId));

    }



}
